#ifndef __LOG_H__
#define __LOG_H__

#ifdef SHOW_LOG

#define LOG(t, x) log_to_console(__FILE__, __LINE__, t, x)

#define LOG_INFO(x) 		LOG(0, x)
#define LOG_WARN(x) 		LOG(1, x)
#define LOG_ERROR(x) 		LOG(2, x)

void log_to_console(char * file, int line, int level, char * msg);

#else

#define LOG(x)

#endif

#endif // __LOG_H__


